package cc.vv.btpartyjob.partymanager.delegate

import android.widget.TextView
import cc.vv.baselibrary.view.BaseTopBarView
import cc.vv.btpartyjob.partymanager.R
import cc.vv.mvp.delegate.BaseAppDelegate

/**
 * 项目统计托管类
 * Created by Chen.qi on 2018/10/24.
 */
class ProjectStatisticsActivityDelegate : BaseAppDelegate() {


    override fun initWidget() {

    }

    override fun initLayoutRes(): Int {
        return R.layout.activity_project_statistics
    }

    /**设置标题title*/
    fun setTopBarTitle(topBarTitle: String) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_aps_topBar)
        titleBar?.setTitle(topBarTitle)
    }


    /**设置标题右边按钮点击事件*/
    fun setTitleBackBtnOnClick(event: BaseTopBarView.EventInterface) {
        val titleBar = getView<BaseTopBarView>(R.id.btv_aps_topBar)
        titleBar?.setEventInterface(event)
    }

    /**
     * 设置开始时间
     */
    fun setStartDateTime(startStr: String) {
        getView<TextView>(R.id.tv_aps_startTime)?.text = startStr
    }

    /**
     * 设置结束时间
     */
    fun setEndDateTime(endStr: String) {
        getView<TextView>(R.id.tv_aps_endTime)?.text = endStr
    }

}